package com.ruoyi.app.controller.business.audit;

import com.ruoyi.business.base.PageParam;
import com.ruoyi.business.goods.domain.JbCropVariety;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.web.controller.business.goods.factory.JbCropVarietyFactory;
import com.ruoyi.web.core.JoController;
import com.ruoyi.web.core.JoR;
import io.swagger.annotations.ApiOperation;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * APP 作物 Controller
 *
 * @author ruoyi
 * @date 2024-10-11
 */
@RestController
@RequestMapping("/app/crop_variety")
public class AppCropVarietyController extends JoController
{

    @Autowired
    private JbCropVarietyFactory factory;

    /**
     * 查询作物列表
     *
     * @param page          分页查询对象
     * @param jbCropVariety 业务作物对象
     * @return
     */
    @SneakyThrows
    @ApiOperation("查询作物列表")
    // @PreAuthorize("@ss.hasPermi('crop_variety:list')")
    @GetMapping("/list")
    public TableDataInfo list(PageParam page, JbCropVariety jbCropVariety)
    {
        return JoR.rows(factory.page(page, jbCropVariety));
    }

}
